export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  dialogWidth: '70%',
  delBtn: false,
  addBtn: false,
  editBtn: false,
  viewBtn: true,
  selection: true,
  labelWidth: 120,
  searchMenuSpan: 6,
  // selectable: row => {
  //   return row.checkSubmit == '0' || row.checkStatus == '1'
  // },
  column: [{
    label: '标识',
    prop: 'id',
    hide: true,
    display: false
  }, {
    label: '年份',
    prop: 'workTime',
    type: 'year',
    format: 'yyyy',
    valueFormat: 'yyyy',
    search: true,
    display: false
  }, {
    label: '月份',
    prop: 'planMonth',
    search: true,
    display: false,
    formatter: (row, value, label, column) => {
      if (value) {
        return value.split(',').map(m => m + '月').join(',')
      }
    },
  }, {
    label: '周',
    prop: 'planWeek',
    type: 'select',
    dicUrl: '/admin/dict/type/plan_week_cycle',
    display: false
  }, {
    label: '计划完成时间',
    prop: 'planFinishTime',
    type: 'datetime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    display: false
  }, {
    label: '票种',
    prop: 'ticketType',
    type: 'select',
    dicUrl: '/support/swpmticketcardtype/dict',
    props: {
      label: 'mainName',
      value: 'mainEnName'
    },
    search: true,
    display: false,
    rules: [{
      required: true,
      message: '请选择票种',
      trigger: 'blur'
    }]
  }, {
    "type": "select",
    "label": "车票名称",
    "prop": "ticketName",
    props: {
      label: 'subName',
      value: 'subEnName'
    },
    dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
    display: false
  }, {
    label: '票价',
    prop: 'ticketPrice',
    type: 'number',
    precision: 2,
    display: false
  }, {
    label: '车票次数',
    prop: 'ticketTimes',
    type: 'number',
    precision: 0,
    display: false
  }, {
    label: '车票有效期',
    prop: 'activeTime',
    // type: 'number',
    // precision: 0,
    display: false
  }, {
    label: '车票最晚使用时间',
    prop: 'latestStartTime',
    type: 'datetime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    display: false
  }, {
    label: '张数',
    prop: 'ticketNumber',
    type: 'number',
    precision: 0,
    display: false
  }, {
    label: '起号/止号',
    prop: 'startEndNo',
    display: false,
    // rules: [{
    //   required: true,
    //   message: '请输入起号/止号',
    //   trigger: 'blur'
    // }]
  }, {
    label: '车票用途',
    prop: 'ticketPurpose',
    display: false,
    hide: true
  }, {
    label: '实际完成时间',
    prop: 'actualFinishTime',
    type: 'datetime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    search: true,
    searchLabelWidth: 100,
    display: false
  }, {
    label: '有效车票数量',
    prop: 'effectiveNumber',
    type: 'number',
    precision: 0,
    display: false
  }, {
    label: '无效车票数量',
    prop: 'invalidNumber',
    type: 'number',
    precision: 0,
    display: false
  }, {
    label: '总数',
    prop: 'totalNumber',
    type: 'number',
    precision: 0,
    display: false
  }, {
    label: '车票编码员',
    prop: 'personName',
    type: 'select',
    component: 'user-select',
    params: {
      userCodeKey: 'personId'
    },
    display: false
  }, {
    label: '车票编码员工号',
    prop: 'personId',
    display: false
  }, {
    label: '是否完成生产',
    prop: 'isFinish',
    type: 'select',
    search: true,
    searchLabelWidth: 100,
    dicData: [{
      label: '是',
      value: '1'
    }, {
      label: '否',
      value: '0'
    }],
    display: false
  },
  {
    label: '数据来源',
    prop: 'dataSource',
    type: 'select',
    dicData: [{
      label: '周计划分解',
      value: '0'
    }, {
      label: '无效票',
      value: '1'
    }, {
      label: '公务票',
      value: '2'
    }, {
      label: '临时计划',
      value: '3'
    }],
    display: false
  }, {
    label: '未完成情况说明',
    prop: 'unfinishReason',
    display: false
  }, {
    label: '审批状态',
    prop: 'checkStatus',
    type: 'select',
    dicUrl: '/admin/dict/type/check_status',
    display: false
  }, {
    label: '审核人',
    prop: 'checkPersonId',
    hide: true,
    display: false
  }, {
    label: '审核时间',
    prop: 'checkTime',
    hide: true,
    display: false
  }, {
    label: '备注',
    prop: 'remark',
    type: 'textarea',
    maxRows: 6,
    minRows: 4,
    display: false
  }, {
    label: '创建人ID',
    prop: 'creatorId',
    hide: true,
    display: false
  }, {
    label: '创建人名称',
    prop: 'creatorName',
    hide: true,
    display: false
  }, {
    label: '创建时间',
    prop: 'createtime',
    hide: true,
    display: false
  },
  {
    label: '任务类型',
    prop: 'taskType',
    type: 'select',
    //day_plant_tasktype
    dicUrl: '/support/swpmticketcardtypeparam/dictPlanAll',
    search: true,
    display: false,
    cascaderItem: ["issuingMethod"],
    props: {
      label: 'label',
      value: 'value'
    },
    rules: [{
      required: true,
      message: '请选择任务类型',
      trigger: 'blur'
    }]
  }, {
    "type": "select",
    "label": "发卡方式",
    "prop": "issuingMethod",
    props: {
      label: 'label',
      value: 'value'
    },
    dicUrl: '/support/swpmticketcardtypeparam/dictPlanAll/{{key}}',
    display: false,
  },
],
  group: [{
    label: '车票生产计划信息',
    column: [{
      label: '月份',
      prop: 'planMonth',
      disabled: true
    }, {
      label: '周',
      prop: 'planWeek',
      disabled: true
    }, {
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      disabled: true
    }, {
      "type": "select",
      "label": "车票名称",
      "prop": "ticketName",
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      disabled: true
    }, {
      label: '票价',
      prop: 'ticketPrice',
      type: 'number',
      precision: 2,
      disabled: true
    }, {
      label: '车票次数',
      prop: 'ticketTimes',
      type: 'number',
      precision: 0,
      disabled: true
    }, {
      label: '车票有效期',
      prop: 'activeTime',
      // type: 'number',
      // precision: 0,
      disabled: true
    }, {
      label: '车票最晚使用时间',
      prop: 'latestStartTime',
      type: 'dateTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      disabled: true
    }, {
      label: '张数',
      prop: 'ticketNumber',
      type: 'number',
      precision: 0,
      disabled: true
    }, {
      label: '车票用途',
      prop: 'ticketPurpose',
      disabled: true,
      display: false
    }, {
      label: '计划完成时间',
      prop: 'planFinishTime',
      type: 'datetime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      disabled: true
    }, {
      label: '车票编码员',
      prop: 'personName',
      type: 'select',
      component: 'user-select',
      params: {
        userCodeKey: 'personId'
      },
      width: 120,
      cell: true,
      disabled: true
    }, {
      label: '车票编码员工号',
      prop: 'personId',
      disabled: true
    } , {
      label: '任务类型',
      prop: 'taskType',
      type: 'select',
      cascaderItem: ["issuingMethod"],
      props: {
        label: 'label',
        value: 'value'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictPlanAll',
      disabled: true
    }, {
      "type": "select",
      "label": "发卡方式",
      "prop": "issuingMethod",
      props: {
        label: 'label',
        value: 'value'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictPlanAll/{{key}}',
      disabled: true
    },    {
      "type": "select",
      "label": "设备类型",
      "prop": "esEquipmentType",
      dicData:[{
        label: 'JC8200编码设备',
        value: '0'
      }, {
        label: 'JC6200D编码设备',
        value: '1'
      }, {
        label: '个性化打印设备',
        value: '2'
      }],
      disabled: true
    }, {
      "type": "select",
      "label": "票卡类型",
      "prop": "esTicketType",
      dicData:[{
        label: 'CPU票卡',
        value: '2'
      }, {
        label: 'UL票卡',
        value: '3'
      }],
      disabled: true
    }, {
      "type": "select",
      "label": "是否是出厂卡初始化",
      "prop": "esIsInitialization",
      dicData:[{
        label: '是',
        value: '是'
      }, {
        label: '否',
        value: '否'
      }],
      disabled: true
    }, {
      "type": "select",
      "label": "应用类型",
      "prop": "esAppTypes",
      dicData:[{
        label: '正常',
        value: '00'
      }, {
        label: '测试',
        value: '01'
      }],
      disabled: true
    }, 
    {
      "type": "select",
      "label": "起始站点",
      "prop": "esStartStation",
      props: {
        label: 'nameCn',
        value: 'locationNumber'
      },
      dicUrl: '/support/swpmticketcardtypeparam/esStationAll',
      disabled: true
    }, {
      "type": "select",
      "label": "结束站点",
      "prop": "esEndStation",
      props: {
        label: 'nameCn',
        value: 'locationNumber'
      },
      dicUrl: '/support/swpmticketcardtypeparam/esStationAll',
      disabled: true
    }, {
      label: '有效开始日期',
      prop: 'esStartDate',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      disabled: true
    }, {
      label: '有效结束日期',
      prop: 'esEndDate',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      disabled: true
    }, {
      label: '起号/止号',
      prop: 'startEndNo',
      disabled: true
    } ]
  }, {
    label: '车票生产实际信息',
    column: [{
      label: '实际完成时间',
      prop: 'actualFinishTime',
      type: 'datetime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      rules: [{
        required: true,
        message: '请选择实际完成时间',
        trigger: 'blur'
      }]
    }, {
      label: '有效车票数量',
      prop: 'effectiveNumber',
      type: 'number',
      precision: 0,
      rules: [{
        required: true,
        message: '请输入有效车票数量',
        trigger: 'blur'
      }]
    }, {
      label: '无效车票数量',
      prop: 'invalidNumber',
      type: 'number',
      precision: 0,
      rules: [{
        required: true,
        message: '请输入无效车票数量',
        trigger: 'blur'
      }]
    }, {
      label: '总数',
      prop: 'totalNumber',
      type: 'number',
      precision: 0
    }]
  }, {
    label: '未完成情况说明',
    column: [{
      label: '未完成情况说明',
      prop: 'unfinishReason',
      type: 'textarea',
      span: 24
    }]
  }, {
    label: '审批内容',
    editDisplay: false,
    column: [{
      label: '审批状态',
      prop: 'checkStatus',
      type: "select",
      dicUrl: '/admin/dict/type/check_status',
      editDisplay: false,
      span: 24
    }, {
      label: '审批建议',
      prop: 'checkSuggest',
      type: 'textarea',
      editDisplay: false,
      span: 24
    }]
  }]
};


export const tableOptionEdit = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  labelWidth: 120,
  submitBtn: false,
  emptyBtn: false,
  group: [{
    label: '车票生产计划信息',
    column: [{
      label: '月份',
      prop: 'planMonth',
      disabled: true
    }, {
      label: '周',
      prop: 'planWeek',
      disabled: true
    }, {
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      disabled: true
    }, {
      "type": "select",
      "label": "车票名称",
      "prop": "ticketName",
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      disabled: true
    }, {
      label: '票价',
      prop: 'ticketPrice',
      type: 'number',
      precision: 2,
      disabled: true
    }, {
      label: '车票次数',
      prop: 'ticketTimes',
      type: 'number',
      precision: 0,
      disabled: true
    }, {
      label: '车票有效期',
      prop: 'activeTime',
      // type: 'number',
      // precision: 0,
      disabled: true
    }, {
      label: '车票最晚使用时间',
      prop: 'latestStartTime',
      type: 'dateTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      disabled: true
    }, {
      label: '张数',
      prop: 'ticketNumber',
      type: 'number',
      precision: 0,
      disabled: true
    }, {
      label: '车票用途',
      prop: 'ticketPurpose',
      disabled: true,
      display: false
    }, {
      label: '计划完成时间',
      prop: 'planFinishTime',
      type: 'dateTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      disabled: true
    }, {
      label: '车票编码员',
      prop: 'personName',
      type: 'select',
      component: 'user-select',
      params: {
        userCodeKey: 'personId'
      },
      width: 120,
      cell: true
    }, {
      label: '车票编码员工号',
      prop: 'personId',
      disabled: true
    }, {
      label: '任务类型',
      prop: 'taskType',
      type: 'select',
      cascaderItem: ["issuingMethod"],
      props: {
        label: 'label',
        value: 'value'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictPlanAll',
    }, {
      "type": "select",
      "label": "发卡方式",
      "prop": "issuingMethod",
      props: {
        label: 'label',
        value: 'value'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictPlanAll/{{key}}',
      display: false,
    }, 
    {
      "type": "select",
      "label": "设备类型",
      "prop": "esEquipmentType",
      dicData:[{
        label: 'JC8200编码设备',
        value: '0'
      }, {
        label: 'JC6200D编码设备',
        value: '1'
      }, {
        label: '个性化打印设备',
        value: '2'
      }],
      display: false,
    }, {
      "type": "select",
      "label": "票卡类型",
      "prop": "esTicketType",
      dicData:[{
        label: 'CPU票卡',
        value: '2'
      }, {
        label: 'UL票卡',
        value: '3'
      }],
      display: false,
    }, {
      "type": "select",
      "label": "是否是出厂卡初始化",
      "prop": "esIsInitialization",
      dicData:[{
        label: '是',
        value: '是'
      }, {
        label: '否',
        value: '否'
      }],
      display: false,
    }, {
      "type": "select",
      "label": "应用类型",
      "prop": "esAppTypes",
      dicData:[{
        label: '正常',
        value: '00'
      }, {
        label: '测试',
        value: '01'
      }],
      display: false,
    }, 
    {
      "type": "select",
      "label": "起始站点",
      "prop": "esStartStation",
      props: {
        label: 'nameCn',
        value: 'locationNumber'
      },
      dicUrl: '/support/swpmticketcardtypeparam/esStationAll',
      display: false,
    }, {
      "type": "select",
      "label": "结束站点",
      "prop": "esEndStation",
      props: {
        label: 'nameCn',
        value: 'locationNumber'
      },
      dicUrl: '/support/swpmticketcardtypeparam/esStationAll',
      display: false,
    }, {
      label: '有效开始日期',
      prop: 'esStartDate',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      display: false,
    }, {
      label: '有效结束日期',
      prop: 'esEndDate',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      display: false,
    }, {
      label: '起号/止号',
      prop: 'startEndNo',
      disabled: false,
      // rules: [{
      //   required: true,
      //   message: '请按照格式输入起号/止号',
      //   trigger: 'blur'
      // }]
    }]
  }, {
    label: '车票生产实际信息',
    column: [{
      label: '实际完成时间',
      prop: 'actualFinishTime',
      type: 'dateTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      disabled: true
    }, {
      label: '有效车票数量',
      prop: 'effectiveNumber',
      type: 'number',
      precision: 0,
      disabled: true
    }, {
      label: '无效车票数量',
      prop: 'invalidNumber',
      type: 'number',
      precision: 0,
      disabled: true
    }, {
      label: '总数',
      prop: 'totalNumber',
      type: 'number',
      precision: 0,
      disabled: true
    }]
  }, {
    label: '未完成情况说明',
    column: [{
      label: '未完成情况说明',
      prop: 'unfinishReason',
      type: 'textarea',
      disabled: true,
      span: 24
    }]
  }]
};


export const tableOptionCompleteInfo = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  labelWidth: 120,
  submitBtn: false,
  emptyBtn: false,
  group: [{
    label: '车票生产计划信息',
    column: [{
      label: '月份',
      prop: 'planMonth',
      disabled: true
    }, {
      label: '周',
      prop: 'planWeek',
      disabled: true
    }, {
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      disabled: true
    }, {
      "type": "select",
      "label": "车票名称",
      "prop": "ticketName",
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      disabled: true
    }, {
      label: '票价',
      prop: 'ticketPrice',
      type: 'number',
      precision: 2,
      disabled: true
    }, {
      label: '车票次数',
      prop: 'ticketTimes',
      type: 'number',
      precision: 0,
      disabled: true
    }, {
      label: '车票有效期',
      prop: 'activeTime',
      // type: 'number',
      // precision: 0,
      disabled: true
    }, {
      label: '车票最晚使用时间',
      prop: 'latestStartTime',
      type: 'dateTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      disabled: true
    }, {
      label: '张数',
      prop: 'ticketNumber',
      type: 'number',
      precision: 0,
      disabled: true
    }, {
      label: '计划完成时间',
      prop: 'planFinishTime',
      type: 'dateTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      disabled: true
    }, {
      label: '车票编码员',
      prop: 'personName',
      type: 'select',
      component: 'user-select',
      params: {
        userCodeKey: 'personId'
      },
      width: 120,
      cell: true,
      disabled: true
    }, {
      label: '车票编码员工号',
      prop: 'personId',
      disabled: true
    }]
  }, {
    label: '车票生产实际信息',
    column: [{
      label: '实际完成时间',
      prop: 'actualFinishTime',
      type: 'dateTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      rules: [{
        required: true,
        message: '请选择实际完成时间',
        trigger: 'blur'
      }]
    }, {
      label: '起号/止号',
      prop: 'startEndNo'
    }, {
      label: '有效车票数量',
      prop: 'effectiveNumber',
      type: 'number',
      precision: 0,
      rules: [{
        required: true,
        message: '请输入有效车票数量',
        trigger: 'blur'
      }]
    }, {
      label: '无效车票数量',
      prop: 'invalidNumber',
      type: 'number',
      precision: 0,
      rules: [{
        required: true,
        message: '请输入无效车票数量',
        trigger: 'blur'
      }]
    }, {
      label: '总数',
      prop: 'totalNumber',
      type: 'number',
      precision: 0,
      disabled: true
    }]
  }, {
    label: '未完成情况说明',
    column: [{
      label: '未完成情况说明',
      prop: 'unfinishReason',
      type: 'textarea',
      span: 24
    }]
  }]
};


